package com.example.mymvp02.LoginMvp;

import com.example.mymvp02.Base.BaseModel;

/**
 * @user XUNUA
 * @email xunua@outlook.com
 * @creat time 2020/4/14 17:03
 */
public class LoginModel extends BaseModel<LoginPresenter,ILoginContract.M>{

    public LoginModel(LoginPresenter mPresenter) {
        super(mPresenter);
    }


    @Override
    public ILoginContract.M getContract() {
        return new ILoginContract.M() {
            @Override
            public void requestLogin(String name, String pwd) throws Exception {
                //请求服务器登陆接口，然后拿到服务器返回J的SON数据
                //...
                String requestpwd="123";
                mPresenter.getContract().responseLoginResult(requestpwd.equals(pwd));//登陆成功
            }
        };
    }
}
